Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: performanceFee error #348

Merged
4 commits merged into from
May 18, 2021
Merged

fix: performanceFee error #348

4 commits merged into from
May 18, 2021

Conversation

zgfzgf
Copy link
Contributor

@zgfzgf zgfzgf commented May 17, 2021

Copy link
Member

@fubuloubu fubuloubu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@steffenix Did we miss this one in #328?

@ghost
Copy link

ghost commented May 18, 2021

We missed that I have made a mistake and added / 2 on managementFee instead of performanceFee.

vault managementFee doesn't need to be capped at MAX_BPS / 2 @zgfzgf

@ghost ghost mentioned this pull request May 18, 2021
@ghost
Copy link

ghost commented May 18, 2021

@zgfzgf can you take care of changing setManagementFee and tests, please?

@zgfzgf
Copy link
Contributor Author

zgfzgf commented May 18, 2021

@steffenix why?
I update tests file. I fell no problem.

@ghost
Copy link

ghost commented May 18, 2021

@steffenix why?
I update tests file. I fell no problem.

https://github.com/yearn/yearn-vaults/blob/master/contracts/Vault.vy#L479

assert fee <= MAX_BPS / 2 should be assert fee <= MAX_BPS
And test needs to be updated accordingly.

@zgfzgf
Copy link
Contributor Author

zgfzgf commented May 18, 2021

assert self.strategies[strategy].performanceFee + self.performanceFee <= MAX_BPS
To achieve this goal
update self.performanceFee check every strategy
optimize code. my understanding:
self.strategies[strategy].performanceFee <= MAX_BPS/2 and self.performanceFee <= MAX_BPS/2

so in func setPerformanceFee
assert fee <= MAX_BPS / 2

@ghost
Copy link

ghost commented May 18, 2021

You have a typo on the commit message fix: performace fee test

@zgfzgf zgfzgf force-pushed the fix-self-performanceFee branch from 1aa6def to afb176a Compare May 18, 2021 09:17
@ghost ghost merged commit 86168c2 into yearn:master May 18, 2021
ghost pushed a commit to Grandthrax/yearn-vaults that referenced this pull request May 19, 2021
* fix: performanceFee error

* fix: performace fee test

* fix: management fee

* fix: set management fee
orbxball pushed a commit to orbxball/yearn-vaults that referenced this pull request Aug 8, 2021
* fix: performanceFee error

* fix: performace fee test

* fix: management fee

* fix: set management fee
sambacha pushed a commit to sambacha/yearn-vaults that referenced this pull request Sep 7, 2021
* fix: performanceFee error

* fix: performace fee test

* fix: management fee

* fix: set management fee
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants